Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra query parameter name when calling sources using the generated code #323

Merged
merged 3 commits into from
Jan 20, 2024

Conversation

dehort
Copy link
Contributor

@dehort dehort commented Jan 20, 2024

The generated code adds an extra "filter=" when building out the url:

>>> urllib.parse.unquote("/api/sources/v3.1/sources?filter=filter%5Bsource_ref%5D%5Beq%5D%3D6c8b50a7-15ec-4278-baf5-6838bf5631c4")
'/api/sources/v3.1/sources?filter=filter[source_ref][eq]=6c8b50a7-15ec-4278-baf5-6838bf5631c4'

Sources expects the url to look like the following:

>>> urllib.parse.unquote("/api/sources/v3.1/sources?filter%5Bsource_ref%5D%5Beq%5D=6c8b50a7-15ec-4278-baf5-6838bf5631c4")
'/api/sources/v3.1/sources?filter[source_ref][eq]=6c8b50a7-15ec-4278-baf5-6838bf5631c4'
>>>

This is pretty gross. I feel bad about it. This needs some tests wrapped around it. That would make me feel a bit better about it.

@dehort dehort merged commit 4cd96e1 into RedHatInsights:master Jan 20, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant